package com.yunxin.core.application.command.product;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;

/**
 * @author zero°
 * @since 2023-05-31
 */
@Data
@Schema(description = "更新产品状态对象")
public class UpdateProductStatusCommand implements Serializable {

    /**
     * id
     */
    @Schema(description = "id")
    @NotNull(message = "id不能为空")
    private Long id;

    /**
     * 产品状态 0.下架 1.上架
     */
    @Schema(description = "产品状态 0.下架 1.上架")
    @Min(value = 0, message = "产品状态最小为0")
    @Max(value = 1, message = "产品状态最大为1")
    @NotNull(message = "产品状态不能为空")
    private Integer productStatus;

    /**
     * 更新人
     */
    @Schema(hidden = true)
    private String editor;
}
